<!DOCTYPE html>
<html>
<head>
    <title>Scatter line chart</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" >

    <link href="../../content/shared/styles/examples-offline.css" rel="stylesheet">
    <link href="../../../styles/kendo.dataviz.min.css" rel="stylesheet">

    <script src="../../../js/jquery.min.js"></script>
    <script src="../../../js/kendo.dataviz.min.js"></script>
    <script src="../../content/shared/js/console.js"></script>
</head>
<body>
    <a class="offline-button" href="../index.html">Back</a>
    
        <div id="example" class="k-content">
            <div class="chart-wrapper">
                <div id="chart"></div>
            </div>
            <script>
                function createChart() {
                    $("#chart").kendoChart({
                        theme: $(document).data("kendoSkin") || "default",
                        title: {
                            text: "Charge current vs. charge time"
                        },
                        legend: {
                            visible: true
                        },
                        seriesDefaults: {
                            type: "scatterLine"
                        },
                        series: [{
                            name: "0.8C",
                            data: [[10, 10], [15, 20], [20, 25], [32, 40], [43, 50], [55, 60], [60, 70], [70, 80], [90, 100]]
                        }, {
                            name: "1.6C",
                            data: [[10, 40], [17, 50], [18, 70], [35, 90], [47, 95], [60, 100]]
                        }, {
                            name: "3.1C",
                            data: [[10, 70], [13, 90], [25, 100]]
                        }],
                        xAxis: {
                            max: 90,
                            labels: {
                                format: "{0}m"
                            },
                            title: {
                                text: "Time"
                            }
                        },
                        yAxis: {
                            max: 100,
                            labels: {
                                format: "{0}%"
                            },
                            title: {
                                text: "Charge"
                            }
                        },
                        tooltip: {
                            visible: true,
                            format: "{1}% in {0} minutes"
                        }
                    });
                }

                $(document).ready(function() {
                    setTimeout(function() {
                        // Initialize the chart with a delay to make sure
                        // the initial animation is visible
                        createChart();

                        $("#example").bind("kendo:skinChange", function(e) {
                            createChart();
                        });
                    }, 400);
                });
            </script>
        </div>

</body>
</html>
